/*
 * @Author: your name
 * @Date: 2022-03-10 21:50:19
 * @LastEditTime: 2022-04-06 15:48:04
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \blog-system-front\src\App.js
 */
import "./App.css";
import React, { Component } from "react";
import { Switch, Route, Redirect } from "react-router-dom";
import { Router } from "react-router";
import { createBrowserHistory } from "history";
import DefaultLayout from "./Containers";
import submitSucces from "./Pages/success";
import View500 from "./Pages/500Page";
import Login from "./Pages/Login";
const history = createBrowserHistory();
window.reactRouter = history;

class App extends Component {
  render() {
    return (
      <Router history={history}>
        <Switch>
          <Route path="/" exact render={() => <Redirect to="/index" />} />
          <Route path="/login" component={Login} />
          <Route path="/500" component={View500} />
          <Route path="/checkout/success/:articleid" component={submitSucces} />
          <Route path="/" component={DefaultLayout} />
        </Switch>
      </Router>
    );
  }
}

export default App;
